package neu.soft.controller;

import neu.soft.entity.DO.ReceiptJournal;
import neu.soft.query.ReceiptJournalQuery;
import neu.soft.service.ReceiptJournalService;
import neu.soft.vo.PageBean;
import neu.soft.vo.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 李博
 * 交易明细接口
 */
@RestController
@RequestMapping("/userPay")
@CrossOrigin
public class ReceiptJournalController {

    @Autowired
    ReceiptJournalService receiptJournalService;

    //分页查询用户交易明细
    @PostMapping("/page")
    public ResultBean<PageBean<ReceiptJournal>> findByPage(ReceiptJournalQuery receiptJournalQuery) {
        PageBean<ReceiptJournal> pageBean = receiptJournalService.findByPage(receiptJournalQuery);
        return ResultBean.success(pageBean);
    }
}
